<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <title>Examples</title>
  <meta name="description" content="">
  <meta name="keywords" content="">
  <link href="" rel="stylesheet">
  <script src="lib/vue.js"></script>
</head>

<body>
  <div id="box">
    <button @click="methodA()">click</button>
  </div>

  <script type="text/javascript">

    function mymethodA() {
      console.log("复杂计算")
    }

    var myobj = {
      methods: {
        methodA: mymethodA
      }
    }

    var yourObj = {
      data: {
        shitPiles: 3
      },
      methods: {
        eat() {
          console.log("dont eat shit");
        },
        methodA() {
          console.log("复杂计算你的头的体积")
        }
      }
    }

    const vm = new Vue({
      el: "#box",
      data: {},

      /* 将其它对象的结构合并过来 碰到同名的key 后来的会覆盖先来的（风险） */
      mixins: [
        myobj,
        yourObj
      ]
    })

    /*
     vnode   vdom
     虚拟dom  virtual dom virtual node
     虚拟节点

     用js对象 模拟的真实dom节点
    */
  </script>
</body>

</html>